//
//  HSLotteryInfoVC.m
//  HolyShit
//
//  Created by Robin on 2017/4/29.
//  Copyright © 2017年 HolyShit. All rights reserved.
//

#import "HSLotteryInfoVC.h"
#import "YSLContainerViewController.h"
#import "HSLotteryAwardInfoVC.h"
#import "HSListVC.h"

@interface HSLotteryInfoVC ()<YSLContainerViewControllerDelegate>

@property (nonatomic, strong) YSLContainerViewController *containerVC;

@end

@implementation HSLotteryInfoVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.leftBarButtonItem = nil;
    self.title = @"彩票资讯";
    [self.view addSubview:self.containerVC.view];
}

- (void)containerViewItemIndex:(NSInteger)index currentController:(UIViewController *)controller
{
    UITableView *tableView = [controller valueForKey:@"tableView"];
    if (tableView) {
        tableView.height = ScreenHeight - NavBarHeight - kYSLMenuHeight - TabbarHeight;
    }
}


- (YSLContainerViewController *)containerVC
{
    if (!_containerVC) {
        HSLotteryAwardInfoVC *vc = [HSLotteryAwardInfoVC new];
//        vc.tableView.height -= kYSLMenuHeight;
        vc.title = @"中奖福地";
        
        HSListVC *vc2 = [HSListVC new];
//        vc2.tableView.height -= kYSLMenuHeight;
        vc2.title = @"新闻";
        _containerVC = [[YSLContainerViewController alloc]initWithControllers:@[vc , vc2] topBarHeight:0 parentViewController:self];
        _containerVC.menuItemFont = MYFont(16);
        _containerVC.menuItemTitleColor = HEXCOLOR(HSColorBlack);
        _containerVC.menuItemSelectedTitleColor = HEXCOLOR(HSColorRed);
        _containerVC.menuBackGroudColor = HEXCOLOR(HSColorBgLight);
        _containerVC.menuIndicatorColor = HEXCOLOR(HSColorRed);
        _containerVC.bNeedIndicator = YES;
        _containerVC.delegate = self;
    }
    return _containerVC;
}

@end
